package com.htfyun.eink.pw.core.enums;

/**
 * RGB转成灰阶
 * A2: 只有黑白,以{@link EinkA2Gate} 设置的临界点,
 * A6: 16 灰阶
 */
public enum EinkDataMode {

    A2(1),
    A4(2),
    A16(3),
    ;

    private final int dataMode;

    EinkDataMode(int val) {
        dataMode = val;
    }

    public int getDataMode() {
        return dataMode;
    }

    /**
     * 当显示模式是A2模式时, 才会用这个.
     */
    public enum EinkA2Gate {
        normal(0x80),
        whiter(0x40),
        blacker(0xc0);

        private final int gateValue;

        EinkA2Gate(int val) {
            gateValue = val;
        }

        public int getGateValue() {
            return gateValue;
        }
    }
}
